package org.com.behavioralPattern.strategyPattern;

/**
 * @author Jonny
 * @version 1.0
 * @Description:
 * @date 2021/4/27 14:15
 */
public class PercentageDiscountStrategy extends DiscountStrategy {
    public PercentageDiscountStrategy(double price,int number){
        super(price,number);
    }

    @Override
    public double calculateDiscount() {
        return getNumber()*getPrice()*0.15;
    }
}
